1. Field
Embodiments relate to efficient line drawing on a video display. More particularly, embodiments relate to drawing anti-aliased lines in any direction using a single prerendered line texture.
2. Background
Conventional set top boxes display lines on a video display, such as a television screen by rendering the lines directly to a frame buffer using the CPU or by creating a large line texture that stores the entire length of the line. Rendering a line directly using the CPU diverts CPU processing from other tasks that it might otherwise perform.
Storing a large line texture can require significant amounts of scarce memory resources. For example, to store a texture required to render a line across an entire 1920×1080 high definition screen requires 2,073,600 bytes of memory. Four times that amount is required to store a full color rendering of the line. As a result, storage of large line textures can be wasteful of available memory resources.
Another issue is that drawing must be to the frame buffer as the frame buffer is what is displayed on the screen. However, such drawing typically requires pixel-by-pixel drawing to the frame buffer. This requires constantly moving memory between user-space memory and kernel-space memory, which can be very costly in terms of performance.